<?php

declare(strict_types=1);

namespace App\Model\Stat;

use Illuminate\Database\Eloquent\Model;

/**
 *  注册统计日志
 */
class StatRegLog extends Model
{
    protected $connection = 'stat';
    protected $table = 'stat_reg_log';

    static function getData($start = '')
    {
        $where = [['flag', 1]];
        if ($start) $where[] = ['created_at', '>', $start];
        else $where[] = ['created_at', '>', date('Y-m-d')];
        return self::where($where)->get()->toArray();
    }
}
